<?php
require_once('GrammarParser.class.php');
require_once('ExpressionParser.class.php');
require_once('../BinaryTreeNode.class.php');
require_once('../BinaryTree.class.php');
require_once('../AbstractSyntaxTree.class.php');
require_once('../TreeTraversable.interface.php');
require_once('../InorderTraversal.class.php');

try {
	$foo = new ExpressionParser("((FOO && BAR) && BLAH) || BAZ"); 
	
	$tree = $foo->parse();
	
	echo $tree . '<br /><br />';
	
	foreach($tree->getIterator(new InorderTraversal()) as $token){
		echo $token . ' ';
	}
}catch(Exception $e){
	echo $e->getMessage();
}

?>
